package com.jz.util;

/**
 * Created by Hasee on 2021-12-24.
 */
public class ResultBuildVO<T> {
    public static<T> ResultVO success(T data){
        ResultVO resultVO = new ResultVO();
        resultVO.setSuccess(true);
        resultVO.setData(data);
        return resultVO;
    }
    public static<T> ResultVO success(){
        ResultVO resultVO = new ResultVO();
        resultVO.setSuccess(true);
        resultVO.setData(null);
        return resultVO;
    }
    public static ResultVO error(String message){
        ResultVO resultVO = new ResultVO();
        resultVO.setSuccess(false);
        resultVO.setErrorMessage(message);
        return resultVO;
    }
}
